var active_li = GetQueryString('active_li');
        var active_span = GetQueryString('active_span');
        var vm = new Vue({
            el: '#app',
            data: {
                active_li: active_li,
                active_span: active_span
            },
            methods: {
                handleLi: function (li, span) {
                    this.active_li = li;
                    this.active_span = span;
                },
                handleClick: function (li, span) {
                    window.location = "NewsInformation.html?active_li=1&active_span=" + span;
                }
            }
        })
        function GetQueryString(name) {
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
            var r = window.location.search.substr(1).match(reg);
            if (r != null) return unescape(r[2]); return null;
        }

        //获取url中的参数
        function getUrlParam(name) {
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
            var r = window.location.search.substr(1).match(reg);  //匹配目标参数
            if (r != null) return unescape(r[2]); return null; //返回参数值
        }
        function paramss(keyname) {
            var params = {
                'apiKey': keyname,
                'deviceType': 'DIC_DEVICE_TYPE_1',
                contentType: "application/json;charset=utf-8",
                datatype: 'json'
            };
            return params;
        }
        $(function () {
            var id = getUrlParam("id");
            var keyname = getUrlParam("keyname");
            ajax('post', '/d_easy/deasy/api', paramss(keyname), 'json', function (data) {
                //新闻动态
                if (keyname == "api_post_getAllNews") {
                    var aa = data.newslist;
                    var navs = $("#Newd_nav").html();
                    $("#Newd_nav").html(navs + '公司新闻');
                    $("#New_back").attr("href", "NewsInformation.html?active_li=1&active_span=11");
                    for (var i = 0; i < aa.length; i++) {
                        if (aa[i].id == id) {
                            console.log(aa[i]);
                            //发布标题
                            $(".profile_title").html(aa[i].title_name);
                            //发布作者
                            var admin_n = $(".source").html();
                            $(".source").html(admin_n + aa[i].username);
                            //发布更新时间
                            var admin_t = $(".time").html();
                            $(".time").html(admin_t + aa[i].update_time);
                            //发布内容
                            $("#NewsDetails").html(aa[i].content);
                            //上下篇
                            if (i == 0) {
                                var b = $("#New_on").html();
                                $("#New_on").html(b + "无");
                                $("#New_on").attr("href", "#");
                                if (i == aa.length - 1) {
                                    var c = $("#New_up").html();
                                    $("#New_up").html(c + "无");
                                    $("#New_up").attr("href", "#");
                                }
                                else {
                                    var c = $("#New_up").html();
                                    $("#New_up").html(c + aa[i + 1].title_name);
                                    $("#New_up").attr("href", "NewsDetails.html?id=" + aa[i + 1].id + "&keyname=api_post_getAllNews" + "&active_span=11");
                                }
                            }
                            if (i == aa.length - 1 && i != 0) {
                                var b = $("#New_on").html();
                                $("#New_on").html(b + aa[i - 1].title_name);
                                $("#New_on").attr("href", "NewsDetails.html?id=" + aa[i - 1].id + "&keyname=api_post_getAllNews" + "&active_span=11");
                                var c = $("#New_up").html();
                                $("#New_up").html(c + "无");
                                $("#New_up").attr("href", "#");
                            }
                            if (aa.length - 1 > i > 0) {
                                var b = $("#New_on").html();
                                $("#New_on").html(b + aa[i - 1].title_name);
                                $("#New_on").attr("href", "NewsDetails.html?id=" + aa[i - 1].id + "&keyname=api_post_getAllNews" + "&active_span=11");
                                var c = $("#New_up").html();
                                $("#New_up").html(c + aa[i + 1].title_name);
                                $("#New_up").attr("href", "NewsDetails.html?id=" + aa[i + 1].id + "&keyname=api_post_getAllNews" + "&active_span=11");
                            }
                        }
                    }
                }
                //行业动态
                if (keyname == "api_post_getAllIndustryDynamics") {
                    var aa = data.industrylist;
                    var navs = $("#Newd_nav").html();
                    $("#Newd_nav").html(navs + '行业动态');
                    $("#New_back").attr("href", "NewsInformation.html?active_li=1&active_span=12");
                    for (var i = 0; i < aa.length; i++) {
                        if (aa[i].id == id) {
                            console.log(aa[i]);
                            //发布标题
                            $(".profile_title").html(aa[i].title_name);
                            //发布作者
                            var admin_n = $(".source").html();
                            $(".source").html(admin_n + aa[i].username);
                            //发布更新时间
                            var admin_t = $(".time").html();
                            $(".time").html(admin_t + aa[i].update_time);
                            //发布内容
                            $("#NewsDetails").html(aa[i].content);
                            //上下篇
                            if (i == 0) {
                                var b = $("#New_on").html();
                                $("#New_on").html(b + "无");
                                $("#New_on").attr("href", "#");
                                if (i == aa.length - 1) {
                                    var c = $("#New_up").html();
                                    $("#New_up").html(c + "无");
                                    $("#New_up").attr("href", "#");
                                }
                                else {
                                    var c = $("#New_up").html();
                                    $("#New_up").html(c + aa[i + 1].title_name);
                                    $("#New_up").attr("href", "NewsDetails.html?id=" + aa[i + 1].id + "&keyname=api_post_getAllIndustryDynamics" + "&active_span=12");
                                }
                            }
                            if (i == aa.length - 1 && i != 0) {
                                var b = $("#New_on").html();
                                $("#New_on").html(b + aa[i - 1].title_name);
                                $("#New_on").attr("href", "NewsDetails.html?id=" + aa[i - 1].id + "&keyname=api_post_getAllIndustryDynamics" + "&active_span=12");
                                var c = $("#New_up").html();
                                $("#New_up").html(c + "无");
                                $("#New_up").attr("href", "#");
                            }
                            if (aa.length - 1 > i > 0) {
                                var b = $("#New_on").html();
                                $("#New_on").html(b + aa[i - 1].title_name);
                                $("#New_on").attr("href", "NewsDetails.html?id=" + aa[i - 1].id + "&keyname=api_post_getAllIndustryDynamics" + "&active_span=12");
                                var c = $("#New_up").html();
                                $("#New_up").html(c + aa[i + 1].title_name);
                                $("#New_up").attr("href", "NewsDetails.html?id=" + aa[i + 1].id + "&keyname=api_post_getAllIndustryDynamics" + "&active_span=12");
                            }
                        }
                    }
                }
                //最新燃油
                if (keyname == "api_post_getAllLatestFuels") {
                    var aa = data.latestfuellist;
                    var navs = $("#Newd_nav").html();
                    $("#New_back").attr("href", "NewsInformation.html?active_li=1&active_span=13");
                    $("#Newd_nav").html(navs + '最新燃油');
                    for (var i = 0; i < aa.length; i++) {
                        if (aa[i].id == id) {
                            console.log(aa[i]);
                            //发布标题
                            $(".profile_title").html(aa[i].title_name);
                            //发布作者
                            var admin_n = $(".source").html();
                            $(".source").html(admin_n + aa[i].username);
                            //发布更新时间
                            var admin_t = $(".time").html();
                            $(".time").html(admin_t + aa[i].update_time);
                            //发布内容
                            $("#NewsDetails").html(aa[i].content);
                            //上下篇
                            if (i == 0) {
                                var b = $("#New_on").html();
                                $("#New_on").html(b + "无");
                                $("#New_on").attr("href", "#");
                                if (i == aa.length - 1) {
                                    var c = $("#New_up").html();
                                    $("#New_up").html(c + "无");
                                    $("#New_up").attr("href", "#");
                                }
                                else {
                                    var c = $("#New_up").html();
                                    $("#New_up").html(c + aa[i + 1].title_name);
                                    $("#New_up").attr("href", "NewsDetails.html?id=" + aa[i + 1].id + "&keyname=api_post_getAllLatestFuels" + "&active_span=13");
                                }
                            }
                            if (i == aa.length - 1 && i != 0) {
                                var b = $("#New_on").html();
                                $("#New_on").html(b + aa[i - 1].title_name);
                                $("#New_on").attr("href", "NewsDetails.html?id=" + aa[i - 1].id + "&keyname=api_post_getAllLatestFuels" + "&active_span=13");
                                var c = $("#New_up").html();
                                $("#New_up").html(c + "无");
                                $("#New_up").attr("href", "#");
                            }
                            if (aa.length - 1 > i > 0) {
                                var b = $("#New_on").html();
                                $("#New_on").html(b + aa[i - 1].title_name);
                                $("#New_on").attr("href", "NewsDetails.html?id=" + aa[i - 1].id + "&keyname=api_post_getAllLatestFuels" + "&active_span=13");
                                var c = $("#New_up").html();
                                $("#New_up").html(c + aa[i + 1].title_name);
                                $("#New_up").attr("href", "NewsDetails.html?id=" + aa[i + 1].id + "&keyname=api_post_getAllLatestFuels" + "&active_span=13");
                            }
                        }
                    }
                }
                //活动优惠
                if (keyname == "api_post_getAllActivityDiscounts") {
                    var aa = data.discountlist;
                    var navs = $("#Newd_nav").html();
                    $("#Newd_nav").html(navs + '活动优惠');
                    $("#New_back").attr("href", "NewsInformation.html?active_li=1&active_span=14");
                    for (var i = 0; i < aa.length; i++) {
                        if (aa[i].id == id) {
                            console.log(aa[i]);
                            //发布标题
                            $(".profile_title").html(aa[i].title_name);
                            //发布作者
                            var admin_n = $(".source").html();
                            $(".source").html(admin_n + aa[i].username);
                            //发布更新时间
                            var admin_t = $(".time").html();
                            $(".time").html(admin_t + aa[i].update_time);
                            //发布内容
                            $("#NewsDetails").html(aa[i].content);
                            //上下篇
                            if (i == 0) {
                                var b = $("#New_on").html();
                                $("#New_on").html(b + "无");
                                $("#New_on").attr("href", "#");
                                if (i == aa.length - 1) {
                                    var c = $("#New_up").html();
                                    $("#New_up").html(c + "无");
                                    $("#New_up").attr("href", "#");
                                }
                                else {
                                    var c = $("#New_up").html();
                                    $("#New_up").html(c + aa[i + 1].title_name);
                                    $("#New_up").attr("href", "NewsDetails.html?id=" + aa[i + 1].id + "&keyname=api_post_getAllActivityDiscounts" + "&active_span=14");
                                }
                            }
                            if (i == aa.length - 1 && i != 0) {
                                var b = $("#New_on").html();
                                $("#New_on").html(b + aa[i - 1].title_name);
                                $("#New_on").attr("href", "NewsDetails.html?id=" + aa[i - 1].id + "&keyname=api_post_getAllActivityDiscounts" + "&active_span=14");
                                var c = $("#New_up").html();
                                $("#New_up").html(c + "无");
                                $("#New_up").attr("href", "#");
                            }
                            if (aa.length - 1 > i > 0) {
                                var b = $("#New_on").html();
                                $("#New_on").html(b + aa[i - 1].title_name);
                                $("#New_on").attr("href", "NewsDetails.html?id=" + aa[i - 1].id + "&keyname=api_post_getAllActivityDiscounts" + "&active_span=14");
                                var c = $("#New_up").html();
                                $("#New_up").html(c + aa[i + 1].title_name);
                                $("#New_up").attr("href", "NewsDetails.html?id=" + aa[i + 1].id + "&keyname=api_post_getAllActivityDiscounts" + "&active_span=14");
                            }
                        }
                    }
                }
            });
        })